//
//  PosNewsView.m
//  PosApp
//
//  Created by 刘萍 on 2018/9/13.
//  Copyright © 2018年 李英新. All rights reserved.
//

#import "PosNewsView.h"

@implementation PosNewsView

- (void)setModel:(PosModel *)model{
    [self.NewsImage sd_setImageWithURL:[NSURL URLWithString:model.pos_pic] placeholderImage:[UIImage imageNamed:@"MainZWImage"]];
    self.NewsName.text = [NSString stringWithFormat:@"%@",model.pos_brand];
    self.NewsName01.text = [NSString stringWithFormat:@"%@",model.pos_title];
    self.NewsPreson.text = [NSString stringWithFormat:@"%@",model.pos_receive];
    NSString * str = @"%";
    if ([model.pos_three isEqual:@"1"]) {
        [self.NewsBotBtn01 setTitle:[NSString stringWithFormat:@"费率：%@%@+3 秒到",model.pos_rate,str] forState:UIControlStateNormal];
    }else{
        [self.NewsBotBtn01 setTitle:[NSString stringWithFormat:@"费率：%@%@秒到",model.pos_rate,str] forState:UIControlStateNormal];
    }
    [self.NewsBotBtn02 setTitle:[NSString stringWithFormat:@"合伙人费率:%@%@",model.pos_viprate,str] forState:UIControlStateNormal];
}

- (void)CreatePosNewsView{
    self.NewsBotLabel01.layer.borderWidth = 1;
    self.NewsBotLabel01.layer.borderColor = [UIColor colorWithRed:248/255.0 green:100/255.0 blue:35/255.0 alpha:1].CGColor;
    
    self.NewsBotLabel02.layer.borderWidth = 1;
    self.NewsBotLabel02.layer.borderColor = [UIColor colorWithRed:255/255.0 green:135/255.0 blue:0/255.0 alpha:1].CGColor;
    
    self.NewsBotLabel03.layer.borderWidth = 1;
    self.NewsBotLabel03.layer.borderColor = [UIColor colorWithRed:106/255.0 green:177/255.0 blue:243/255.0 alpha:1].CGColor;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
